-- GENERATED SPELL FOR [Raging Moonkin] --


function spell0_10160(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_10160', 533, 1)
end

function spell1_10160(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10160', 15000, 1)
end

function Sorts_10160(pUnit, Event)
local choix_sorts_10160 = math.random(0, 1)
if choix_sorts_10160 == 0 then
pUnit:RegisterEvent('spell0_10160', 1, 1)
end
if choix_sorts_10160 == 1 then
pUnit:RegisterEvent('spell1_10160', 1, 1)
end
end

function mob10160_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10160', math.random(1500, 3000), 1)
end

function mob10160_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10160_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10160_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10160, 1, 'mob10160_Action')
RegisterUnitEvent(10160, 2, 'mob10160_Leave')
RegisterUnitEvent(10160, 3, 'mob10160_Kill')
RegisterUnitEvent(10160, 4, 'mob10160_Die')
